﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace console.demo
{
    public class Error
    {
        int result;
        public Error()
        {
            result = 0;
        }
        public void division(int num1, int num2)
        {
            try
            {
                result = num1 / num2;
            }
            catch (DivideByZeroException e)
            {
                Console.WriteLine(e);
                throw new DivideByZeroException();
            }
            finally
            {
                Console.WriteLine(result);
            }
        }
    }
}
